package com.york.subject.application.convert;

import com.york.subject.application.dto.SubjectInfoDTO;
import com.york.subject.domain.entity.SubjectInfoBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 拦截器，实现转换器功能，因为我们需要的是SubjectInfoBO对象，而该模块使用SubjectInfoDTO
 */
@Mapper
public interface SubjectInfoDTOConverter {

    // 返回实现接口的实例
    SubjectInfoDTOConverter INSTANCE = Mappers.getMapper(SubjectInfoDTOConverter.class);

    SubjectInfoBO convertDTOToBO(SubjectInfoDTO subjectInfoDTO);


    SubjectInfoDTO convertBOToDTO(SubjectInfoBO subjectInfoBO);

    List<SubjectInfoDTO> convertBOToDTOList(List<SubjectInfoBO> boList);
}
